﻿using System.Data;
using BookTheBook.Data.NameDefinitions;
using Migrator.Framework;

namespace BookTheBook.Migrations
{
    [Migration(5)]
    public class _005_NewTableRole : Migration
    {
        public override void Up()
        {
            Database.AddTable(TableNames.Role,
                              new Column(ColumnNames.RoleId, DbType.Int32, ColumnProperty.PrimaryKeyWithIdentity),
                              new Column(ColumnNames.RoleName, DbType.String, ColumnProperty.NotNull ));
        }

        public override void Down()
        {
            Database.RemoveTable(TableNames.Role);
        }
    }
}
